package com.zxl.controller;

import com.zxl.entity.Stock;
import com.zxl.service.impl.StockServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @packageName com.zxl.controller
 * @ClassName
 * @Author zxl
 * @Description //TODO
 * @date
 **/
@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    private StockServiceImpl stockService;


    @RequestMapping("/add")
    public boolean add(@RequestBody Stock stock){
        return stockService.save(stock);
    }

}
